<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>登陆</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="description" content="Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.
">
    <link rel="stylesheet"  th:href="@{/wxui/lib/weui.min.css}">
    <link rel="stylesheet"  th:href="@{/wxui/css/jquery-weui.css}">
    <link rel="stylesheet"  th:href="@{/wxui/css/style.css}">
</head>
<body ontouchstart style="background:#323542;">
<!--主体-->
<div class="wy-header-icon-back"><span></span></div>
<div class="login-box">
    <div style="width: 80px;margin: 0 auto;margin-top: 10px;">
        <img class="radius" style="width:80px;height: 80px;" th:src="@{/wxui/images/headimg.jpg}" alt="">
    </div>
    <div class="login-form">
        <form action="#" id="loginForm">
            <div class="login-user-name common-div">
            	<span class="eamil-icon common-icon">
                	<img th:src="@{/wxui/images/eamil.png}"/>
                </span>
                <input type="email" name="loginname" value="" placeholder="请输入您的账号"/>
            </div>
            <div class="login-user-pasw common-div">
            	<span class="pasw-icon common-icon">
                	<img th:src="@{/wxui/images/password.png}"/>
                </span>
                <input type="password" name="loginpwd" value="" placeholder="请输入您的密码"/>
            </div>
            <a href="javascript:;" class="login-btn common-div">登陆</a>
            <a href="javascript:;" class="login-oth-btn common-div">微信登陆</a>
        </form>
    </div>
    <div class="forgets">
        <a href="psd_chage.html">忘记密码？</a>
        <a href="/user/frontstage/goRegistPage">免费注册</a>
    </div>


</div>
<script th:src="@{/wxui/lib/jquery-2.1.4.js}"></script>
<script th:src="@{/wxui/lib/fastclick.js}"></script>
<script type="text/javascript" th:src="@{/wxui/js/jquery.Spinner.js}"></script>
<script>
    $(function () {
        $(".wy-header-icon-back").click(function () {
            window.history.back();
        });
        doLogin();
    });

    /*****************************
    * @Description: 用户登录
    * @Param:  
    * @return:  
    * @Author: 刘涛 
    * @Date: 2018/3/19 
    *******************************/
    function doLogin() {
        $(".login-btn").click(function () {
            $.ajax({
                type: "post",
                url: "../frontstage/doLogin",
                dataType: 'json',
                data: $("#loginForm").serialize(),
                success: function (data) {
                    if (data.code == 200) {
                        location.href = '/index';
                            $.toast(data.msg, "text");
                    } else {
                        $.toast(data.msg, "text");
                        return;
                    }
                }
            });
        })
    }

</script>

<script th:src="@{/wxui/js/jquery-weui.js}"></script>

</body>
</html>
